'use strict';

const { Controller, Utils } = require('ee-core');
const path = require('path');
const { exec } = require('child_process');
const { killProcess } = require('../utils');

let task;

class ModelController extends Controller {
  constructor(ctx) {
    super(ctx);
  }

  modelConversion(args) {
    let fbx2gltfExePath = path.join(Utils.getExtraResourcesDir(), './fbx2gltf/fbx2gltf.exe');
    let cmdStr = `${fbx2gltfExePath} ${args}`;
    task = exec(cmdStr);
    return '开始处理...';
  }

  closeModelConversion() {
    return 'Hello World';
  }
}

ModelController.toString = () => ['class ModelController'];
module.exports = ModelController;
